<%--=========================================================================== 
This is the page directive. Sets the content type and encoding.
Encoding of the response: UTF-8
Encoding of this JSP page: Cp1251 
===========================================================================--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="Cp1251"%>
<%@ taglib uri="/WEB-INF/st4" prefix="st"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Start Page</title>
<link rel="stylesheet" type="text/css" href="styles/st4.css" />
<jsp:include page="/WEB-INF/includes/scripts.jsp" />
<script type="text/javascript" src="js/jQuery.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
	});
	
	function getAjax(request){
		createPopupMessage("Data is being requested");
		$("#ajax_result").html('');
		jQuery.ajax ({
			url: request, 
			dataType : 'html',
			success: function (data, textStatus) {
				$("#ajax_result").html('');
				$("#ajax_result").append(data);
				closePopup(300);
			},
			error: function (msg) {
				closePopup(300); 
				createPopupMessage("Error while getting data");
			}
		});
		return false;
	}
</script>
</head>
<body>
	<table class="page">

		<%--========================================================================--%>
		<jsp:include page="/WEB-INF/includes/header.jsp" />

		<jsp:include page="/WEB-INF/includes/menu.jsp" />
		<%--========================================================================--%>

		<tr class="content">
			<td>
				<div class="left_menu">
					<div class="admin_menu_item">
						<a href="controller?command=goto&path=WEB-INF/jsp/addAirport.jsp"
							>1 <st:i18n key="Users management" /></a>
					</div>
					<div class="admin_menu_item">
						<a onclick="getAjax('controller?command=goto&path=WEB-INF/jsp/addAirport.jsp');"
							>2 <st:i18n key="menu.add_airport" /></a>
					</div>
					<div class="admin_menu_item">
						<a href="controller?command=showOrders" ><st:i18n
								key="menu.add_flight" /></a>
					</div>
					<div class="admin_menu_item">
						<a href='default?command=get_pdf_report'>3 <st:i18n key="Get PDF report" /></a>
					</div>
					<div class="admin_menu_item">
						<a onclick="getAjax('ajax?command=get_report');"
							>4 <st:i18n key="Get report" /></a>
					</div>
					<div class="admin_menu_item">
						<a href="ajax?command=goto&path=WEB-INF/jsp/addAirport.jsp"
							>5<st:i18n key="Add airplane" /></a>
					</div>
					<div class="admin_menu_item">
						<a href="ajax?command=create_flights">5<st:i18n
								key="Create flights for 2 months forvard" /></a>
					</div>
				</div>

				<div class="admin_content" id="ajax_result"></div>

			</td>
		</tr>
		<%--========================================================================--%>
		<jsp:include page="/WEB-INF/includes/footer.jsp" />
		<%--========================================================================--%>

	</table>
</body>
</html>